home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
MEMORY
/
OLD
/
MEM208SRC
/
!Memphis
/
h
/
inode
< prev
next >
Wrap
Text File
|
1993-09-08
|
1KB
|
44 lines
/*
* inode.h
* Part of the !Memphis distribution
* (c) bdb/nas, 1991-3
*/
typedef struct STOREINODE
{
FileDesc d;
int allocated;
int parentinode;
} STOREINODE;
typedef struct INODE
{
FileDesc d;
int allocated;
int parentinode;
int uses;
int changed;
storeid store;
int inode;
} INODE;
_kernel_oserror *Inode_Init(void);
_kernel_oserror *Inode_Finish(void);
extern volatile int Inode_flushcount;
INODE *Inode_Find( storeid store, int inode );
_kernel_oserror *Inode_EnsureSize( INODE *inode, int size );
INODE *Inode_New( INODE *parentinode );
_kernel_oserror *Inode_Delete( INODE *inode );
_kernel_oserror *Inode_Read( INODE *inode, int offset, int length, void *ptr );
_kernel_oserror *Inode_Write( INODE *inode, int offset, int length, void *ptr );
void Inode_Ticker(void);
void Inode_Flush(void);
#ifndef DEBUG
#define Inode_Dup(p) (p->uses++,p)
#define Inode_Lose(p) (p->uses--)
#define Inode_Changed(p) (p->changed++,Inode_flushcount=0)
#else
#define Inode_Dup(p) (p->uses++,printf("Dupped %p[%d]",p,p->uses),p)
#define Inode_Lose(p) (p->uses--,printf("Lost %p[%d]",p,p->uses))
#define Inode_Changed(p) (p->changed++,Inode_flushcount=0,printf("Changed %p[%d]",p,p->changed))
#endif